#ifndef ASTNODE_IF_STATEMENT_H
#define ASTNODE_IF_STATEMENT_H
#include "AstNode.h"

class AstNodeBooleanOperator;

class AstNodeIfStatement : public AstNode
{
  public:
    AstNodeIfStatement(
      AstNodeBooleanOperator * condition, 
      AstNode* true_body,
      AstNode* false_body);

    virtual void compile(class CompileVisitor*);
    virtual void dump(int level);

    inline AstNodeBooleanOperator * getCondition() { return condition; }
    inline AstNode                * getTrueBody()  { return true_body; }
    inline AstNode                * getFalseBody() { return false_body; }

    //virtual int  compile(ClassFile * klass, MethodInfo * method);
  private:
    AstNodeBooleanOperator * condition;
    AstNode                * true_body;
    AstNode                * false_body;
};
#endif
